package com.wxc.vo;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wxc
 * @date 2021年10月01日 16:54
 */
@Data
@Accessors(chain = true)
public class Message<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    T data;
    private String sender;
    private String receiver;
    private Date date = new Date();
    private MessageType type;

    public enum MessageType implements Serializable {
        LOGIN,
        CHAT,
        SHOW_USERS,
        CHAT_ALL,
        FILE,
        PUSH,
        QUIT;
    }
}
